package com.app.service;

import java.util.ArrayList;

import org.json.JSONException;
import org.json.JSONObject;

import com.app.data.LineItem;


public class TicketService extends BaseService
{
	String urlString = url_base + "/api/hotel.php?htype=2";
	public TicketService(HttpCallBack callBack) {
		super(callBack);
	}

	@Override
	protected String doInBackground(String... params) {
		return connectUrl(urlString);
	}
	@Override
	protected void onPostExecute(String result) {
		// TODO Auto-generated method stub
		super.onPostExecute(result);
		 try {
	   		 ArrayList<LineItem> list = new ArrayList<LineItem>();
	   		 JSONObject object = new JSONObject(result);
	   		 
	   		 
	   		callback.lineFinishLoad(0, list);
	   	   } catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			callback.lineFinishLoad(-1, new ArrayList<LineItem>());
	   	  }
	}
}
